<template>
  <div>
  <h1>父组件</h1>
  <son :info="info" :obj="obj" :msg="msg"></son>
  </div>
</template>

<script lang="ts">
import { defineComponent,ref,reactive } from 'vue'
import Son from './components/Son.vue'
export default defineComponent({
  setup () {
    const info = ref("被子都受潮了");
    const obj = reactive({
      name:"tom",
      age:18
    });
    function foo(){
      console.log(info);
    }

    const msg = ref("计算机要从娃娃抓起");
    return {
      info,
      obj,
      foo,
      msg
    }
  },
  components:{
    Son,  
  },
})
</script>

<style scoped>

</style>